<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>示例</title>
    <style>
      body {
        margin: 0;
        padding: 0;
        background-color: #262626;
      }

      .box {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 70px;
        height: 70px;
      }

      .box span {
        position: absolute;
        display: block;
        width: 20px;
        height: 20px;
        background: #ff0;
        /* border-radius: 50%; */
      }
      .box span:nth-child(1) {
        background: #fff900;
        box-shadow: 0 0 25px #fff900;
        animation: animate 2s linear infinite;
      }
      .box span:nth-child(2) {
        background: #08ff28;
        box-shadow: 0 0 25px #08ff28;
        animation: animate 2s linear infinite;
        animation-delay: -1s;
      }
      .box span:nth-child(3) {
        background: #ff005a;
        box-shadow: 0 0 25px #ff005a;
        animation: animate 2s linear infinite;
        animation-delay: -0.5s;
      }
      .box span:nth-child(4) {
        background: #3896ff;
        box-shadow: 0 0 25px #3896ff;
        animation: animate 2s linear infinite;
        animation-delay: -1.5s;
      }

      @keyframes animate {
        0% {
          top: 0;
          left: 0;
        }
        5% {
          top: 0;
          left: 0;
        }
        20% {
          top: 0;
          left: 50%;
        }
        25% {
          top: 0;
          left: 50%;
        }
        50% {
          top: 50%;
          left: 50%;
        }
        55% {
          top: 50%;
          left: 50%;
        }
        75% {
          top: 50%;
          left: 0;
        }
        80% {
          top: 50%;
          left: 0;
        }
        100% {
          top: 0;
          left: 0;
        }
      }
    </style>
  </head>
  <body>
    <div class="box">
      <span></span>
      <span></span>
      <span></span>
      <span></span>
    </div>
  </body>
</html>
